

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
<HEAD>
  <style>
    #main { height: 31px; width:100%; background-color:#3B5998; color:#D8DFEA; padding:4px;
      font-size: 11px;
      font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
    }

    #picture 
    {
      float:left;
    }

    #picture img
    {
      height: 31px;
      width: 31px;
    }

    #name
    {
      font-size: 13px;
      margin-left: 38px;
      padding-top:6px;
      font-weight: bold;
      cursor: pointer;
    }
    #name:hover { color:White; }

  </style>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <script src="./core/event.js"></script>
<script>

function MeView()
{
  this.counter = 0;
  this.update = function()
  {
    //document.getElementById('counter').innerHTML=++this.counter;
    if ( model.me.name ) 
      document.getElementById('name').innerHTML=model.me.name;
    if ( model.me.picture )
      document.getElementById('picture').innerHTML="<img src='"+model.me.picture+"'/>";
    
  }
};

function OnLoad()
{
  try
  {
    window.model = window.parent.model;
    window.ctrl = window.parent.ctrl;
    
    meView = new MeView();
    ctrl.me.subscribe(meView);
    //alert(window.parent.meController);
    //window.parent.__meLoaderFacebook.subscribe(meView);
  }
  catch(e)
  {
    alert(e.message);
  }
}

Event.add(window, 'load', OnLoad)
</script>
</HEAD>
<BODY>
<div id = "main">

<div id="picture"></div>
<div id="name"></div>
</div>
</BODY>
</HTML>
